<template>
	<view></view>
</template>

<script>
export default {
	onLoad(e) {
		this.$http
			.request({
				url: 'api/Community/CheckIn',
				method: 'PUT',
				data: {
					id: e.scene
				}
			})
			.then(() => {
				uni.showToast({
					icon: 'success',
					title: '签到成功'
				});
			})
			.finally(() => {
				// #ifdef H5
				this.$wechat.share({
					link: this.$handlerAppMessagePath()
				});
				// #endif
				setTimeout(function() {
					uni.switchTab({
						url: '../index/index'
					});
				}, 1500);
			});
	},
	onShareAppMessage(e) {
		return {
			path: this.$handlerAppMessagePath()
		};
	}
};
</script>

<style></style>
